package com.code.base.busi.service;

import java.util.List;
import java.util.Date;
import java.util.Map;
import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.code.base.busi.persistence.BusiDepReqMapper;
import com.code.base.busi.pojo.BusiDepReq;
import com.code.util.PrimaryKeyUtil;


@Service
public class BusiDepReqService {


	@Resource
	private BusiDepReqMapper busiDepReqMapper;

	public Long getInsertId() {
		return PrimaryKeyUtil.generatePrimaryKey();
	}

	public BusiDepReq getDataById(Long id) {
		return busiDepReqMapper.getDataById(id);
	}

	public List<BusiDepReq> getAllData() {
		return busiDepReqMapper.getAllData();
	}

	public int getDataCountByCondition(BusiDepReq entity) {
		return busiDepReqMapper.getDataCountByCondition(entity);
	}

	public List<BusiDepReq> getDataByCondition(BusiDepReq entity) {
		return busiDepReqMapper.getDataByCondition(entity);
	}

	public int getDataCountByLikeCondition(BusiDepReq entity) {
		return busiDepReqMapper.getDataCountByLikeCondition(entity);
	}

	public List<BusiDepReq> getDataByLikeCondition(BusiDepReq entity) {
		return busiDepReqMapper.getDataByLikeCondition(entity);
	}

	public List<BusiDepReq> getDataByIds(Long[] ids) {
		return busiDepReqMapper.getDataByIds(ids);
	}

	public void insertData(BusiDepReq entity) {
		insertData(entity, true);
	}

	public void insertData(BusiDepReq entity, boolean setIdValue) {
		if (setIdValue) {
			entity.setId(getInsertId());
		}
		busiDepReqMapper.insertData(entity);
	}

	public void updateData(BusiDepReq entity) {
		busiDepReqMapper.updateData(entity);
	}

	public void updateDataByParam(Map<String, Object> map) {
		if (map.size() == 0)
			return;

		busiDepReqMapper.updateDataByParam(map);
	}

	public void deleteDataByObject(BusiDepReq entity) {
		busiDepReqMapper.deleteDataByObject(entity);
	}

	public void deleteDataById(Long id) {
		busiDepReqMapper.deleteDataById(id);
	}

	public void deleteDataByIds(Long[] ids) {
		busiDepReqMapper.deleteDataByIds(ids);
	}

}
